﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BiliBiliCSharpStudy.old {
    class DemoForReturn {
        public static void demo() {
            Greeting("Mr.okay");
        }



        // 尽早return
        static void Greeting(string name) {
            if (string.IsNullOrEmpty(name)) {
                return;
            }
            Console.WriteLine("Hello, {0}!", name);
            Console.WriteLine($"Hello, {name}!");
        }
    }
}
